import React, { Component } from 'react';
import { Switch,Route } from 'react-router-dom'

import Header from '../../component/header/header';
import Footer from '../../component/footer/footer';
import Left from '../../component/left/left';
import Home from '../home/home';
import './main.css'

class Main extends Component {

    render() {
        const urlList = [
            {
                title:'组织信息',
                url:'/page1',
                component:Home
            },
            {
                title:'运营数据',
                url:'/page2',
                component:Home
            },
            {
                title:'存管披露',
                url:'/page3',
                component:Home
            },
            {
                title:'荣誉资质',
                url:'/page4',
                component:Home
            },
            {
                title:'审核信息',
                url:'/page5',
                component:Home
            },
            {
                title:'风险管理',
                url:'/page6',
                component:Home
            },
            {
                title:'法律法规',
                url:'/page7',
                component:Home
            },
            {
                title:'收费标准',
                url:'/page8',
                component:Home
            },
            {
                title:'关于我们',
                url:'/page9',
                component:Home
            },
        ]
        return (
            <div className="bg">
                <Header />
                <div className="body">
                    <div className="left">
                        <Left data={urlList} />
                    </div>
                    <div className="content">
                        <Switch>
                            {urlList.map(v=>(
                                <Route key={v.title} path={v.url} component={v.component} />
                            ))}
                        </Switch>
                    </div>
                </div>

                <Footer />
            </div>
        )
    }
}

export default Main